package com.example.study_thread.a_file;

import java.io.File;

public class Demo2File {
    public static void main(String[] args) {
        File file = new File("D:\\java_project\\study_thread\\src\\main\\java\\com\\example\\testFile.jpg");
        System.out.println("file:" + file);

        File file1 = new File("D:\\java_project\\study_thread\\src\\main\\java\\com\\example", "testFile1.jpg");
        System.out.println("file1:" + file1);

//        父路径为一个File对象
        File parent = new File("D:\\java_project\\study_thread\\src\\main\\java\\com\\example");
        File file2 = new File(parent, "testFile2.jpg");
        System.out.println("file2:" + file2);
    }
}
